package nanogreenhouse;

class Alarmas {
	void m() {
		System.out.println("Alarma Instalada");
	}
}

class Sensor {
	void m() {
		System.out.println("Sensor de");
	}
}

class SensorLuz extends Sensor{
	void m() {
		System.out.println("  Luz");
	}
}

class SensorAgua extends Sensor{
	void m() {
		System.out.println("  Agua");
	}
}

class SensorTemperatura extends Sensor{
	void m() {
		System.out.println("  Temperatura");
	}
}

class Log {
	void m() {
		System.out.println("Generando Log");
	}
}


public class Insumos {
	public static Object fabrica(String s) {
		if (s.equals("Alarmas"))
			return new Alarmas();
		else if (s.equals("SensorLuz"))
			return new SensorLuz();
		else if (s.equals("SensorAgua"))
			return new SensorAgua();
		else if (s.equals("SensorTemperatura"))
			return new SensorTemperatura();
		else if (s.equals("Log"))
			return new Log();
		else
			return null;
	}
}
